package com.esd.crm.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/security")
public class SecurityController {
	private static final Logger logger = LogManager.getLogger(SecurityController.class);

	/**
	 * 跳转保存成功页面
	 */
	@RequestMapping(value = "/success", method = RequestMethod.GET)
	public ModelAndView success(HttpSession session, HttpServletRequest request) {
		logger.info("保存成功页面！");
		ModelAndView mv = new ModelAndView("success");
		return mv;
	}


	/**
	 * 跳转保存成功页面
	 */
	@RequestMapping(value = "/successAndClose", method = RequestMethod.GET)
	public ModelAndView successAndClose(HttpSession session, HttpServletRequest request) {
		logger.info("保存成功关闭页面！");
		ModelAndView mv = new ModelAndView("success_close");
		return mv;
	}
}
